#include <iostream>
using namespace std;

int main() {
    int m,n;
    int sum = 0;
    cin >> m >> n;
    if (m > n || n > 1000 || n <= 0 || m > 1000 || m <= 0)
    {
        return 0;
    }
    for (int i = m; i <= n; i++)
    {
        if (i % 17 == 0) {
            sum += i;
        }
    }
    cout << sum;
    
    return 0;
}